﻿
<div>
    <form name="workFlow_ProcessCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.workFlow_Process.id">编辑信息:{{vm.workFlow_Process.name}}</span>
                <span ng-if="!vm.workFlow_Process.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.workFlow_Process.flowID" required>
                    <option ng-repeat="x in vm.workFlowList" value="{{x.id}}" ng-selected="vm.workFlow_Process.flowID==x.id">{{x.flowName}}</option>
                </select>
                <label>流程</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <select name="TableID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.workFlow_Process.tableID" required>
                    <option ng-repeat="x in vm.workFlowTableNameList" value="{{x.id}}" ng-selected="vm.workFlow_Process.tableID==x.id">{{x.tableName}}</option>
                </select>
                <label>关联表</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="ProcessName" ng-class="{'edited':vm.workFlow_Process.processName}" ng-model="vm.workFlow_Process.processName" maxlength="50" required />
                <label>步骤名称</label>
                <span class="help-block">     @L("ProcessName")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="ProcessType" ng-class="{'edited':vm.workFlow_Process.processType}" ng-model="vm.workFlow_Process.processType" maxlength="50" required />
                <label>步骤类型is_one发起is_step正常步骤is_end办结</label>
                <span class="help-block">     @L("ProcessType")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="ProcessTo" ng-class="{'edited':vm.workFlow_Process.processTo}" ng-model="vm.workFlow_Process.processTo" maxlength="50" required />
                <label>转交下一步骤号</label>
                <span class="help-block">     @L("ProcessTo")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="RangeUsers" ng-class="{'edited':vm.workFlow_Process.rangeUsers}" ng-model="vm.workFlow_Process.rangeUsers" maxlength="1000" />
                <label>经办人-存userid，逗号隔开</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="RangeNames" ng-class="{'edited':vm.workFlow_Process.rangeNames}" ng-model="vm.workFlow_Process.rangeNames" maxlength="1000" />
                <label>经办人-存username，逗号隔开</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="IsUserEnd" ng-class="{'edited':vm.workFlow_Process.isUserEnd}" ng-model="vm.workFlow_Process.isUserEnd" />
                <label>是否允许该主办人可办结0不可1可</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="number" class="form-control" name="ProcessOrder" ng-class="{'edited':vm.workFlow_Process.processOrder}" ng-model="vm.workFlow_Process.processOrder" />
                <label>排序</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditWorkFlow_Process_DelTag" class="md-check" type="checkbox" name="DelTag" ng-model="vm.workFlow_Process.delTag">
                        <label for="EditWorkFlow_Process_DelTag">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            是否可用
                        </label>
                    </div>
                </div>
            </div>

        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="workFlow_ProcessCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>